package cc.magicjson.summary.errors.connection.closed.service.message.consumer;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

@Component
public class MessageConsumer {

    /**
     * 监听指定队列并处理消息
     *
     * @param message 消息内容
     */
    @JmsListener(destination = "active.queue",containerFactory = "jmsListenerContainerFactory")
    public void receiveMessage(String message) {
        System.out.println("接收到消息：" + message);
    }
}
